This disclosure relates generally to graphics rendering. More particularly, but not by way of limitation, this disclosure relates to dynamically selecting image rendering formats for one or more digital images.
Graphics processing units (GPUs) have become important for processing data-parallel graphics tasks. Developers have also recognize that GPUs are able to handle non-graphics data-parallel tasks that may benefit from the GPUs' massive parallel capabilities. To accommodate high level developer programming interactions with the GPUs, vendors and standards organizations have created application programming interfaces (APIs) that simplify implementing graphics data-parallel tasks. Venders and standards organizations also generally employ low-level APIs, libraries, and/or frameworks that reside closer to graphics processing resources (e.g., the GPU) and apply the output for higher-level APIs. In particular, the higher-level APIs generally prepare program code that call and apply the lower-level APIs, libraries, and/or frameworks to utilize the GPUs.
When a computing application launches and attempts to render digital images, APIs and/or frameworks may initially allocate graphics hardware resources, such as memory buffers and GPUs, during a rendering initialization phase. In order to reduce computational cost and increase operation efficiency, APIs and/or frameworks may commit a pre-determined amount of graphics hardware resources to render the digitals images. For example, APIs and/or frameworks generally allocate memory resources to store graphics contexts that render standard red-blue-green (sRGB) images. However, initially limiting the memory capacity for storing graphics contexts creates an inability to draw higher quality digital images, such as high dynamic range (HDR) images. For instance, after an API and/or framework commits memory resources for rendering sRGB images, the API and/or framework may be unable to render a subsequent HDR image that exceeds the capacity of the graphics contexts.
One alternative is for APIs and/or frameworks to employ a worst case scenario approach when allocating memory and other graphics hardware resources. Specifically, during the rendering initialization phase, APIs and/or frameworks may initially allocate enough memory space to store graphics contexts for not only sRGB images, but higher quality images with greater dynamic ranges in luminosity and/or a wider color gamut. Unfortunately, over allocating graphics hardware resources is often computationally expensive, increases power consumption, and decreases overall operation efficiency. For example, APIs and/or frameworks may squander graphics processing resources when rendering a relatively low quality digital image, such as a black and white text image (e.g., the word “fox”), with graphics contexts set up to draw relatively higher quality images (e.g., HDR images). As such, creating APIs and/or frameworks that adaptively account for varying digital image qualities may be beneficial for the graphics rendering process.